<?php $src = $_GET['src']; ?>
<?php $name = $_GET['name']; ?>
<?php if(!$src) exit('Access Denied'); ?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>音乐试听</title>
	<style>
	body{font:12px arial,sans-serif;}
	button{width:80%;height:100px;}
	</style>
</head>
<body>
<div align="center">
<p id="text">点击按钮开始播放 <?php echo $name; ?></p>
<button id="next">播放</button>
</div>
<script>
var $=function(i){return document.getElementById(i)};
fm=new Audio();
fm.src='<?php echo $src; ?>';
$('next').onclick=function(){
	if(fm.paused){
		fm.play();
		this.innerHTML='暂停';
	}else{
		fm.pause();
		this.innerHTML='播放';
	}
}
</script>
</body>
</html>